﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using syc.js.autocomplete.tests;
using System.Data;
namespace syc.Sale
{
    public partial class GongYingHT : System.Web.UI.Page
    {
        protected string hetong;
        protected void Page_Load(object sender, EventArgs e)
        {
            hetong = Request.QueryString["hetong"];
            try
            {     
                 
                string sql=@"SELECT     dbo.采购原料合同.编号 from 采购原料合同  where 编号 like '%@编号%'
                union
                SELECT     dbo.采购材料合同.编号 from 采购材料合同  where 编号 like '%@编号%'";
                sql=sql.Replace("@编号",hetong);
                this.SqlDataSource1.SelectCommand = sql;
                DataView dv = (DataView)this.SqlDataSource1.Select(new DataSourceSelectArguments());
                for (int i = 0; i < dv.Count; i++)
                {
                    Response.Write(dv[i][0].ToString() + "\n");
                }
            }
            catch (NullReferenceException)
            {
                Response.Write("\n");
            }
        }
    }
}
